package com.ktgj.customer.service;

import java.util.List;

import com.ktgj.customer.domain.*;
import com.ktgj.customer.domain.vo.MallCartVO;
import com.ktgj.customer.domain.vo.WholeMallOrderVO;
import org.apache.ibatis.annotations.Param;

import javax.servlet.http.HttpServletRequest;

/**
 * 订单Service接口
 * 
 * @author ruoyi
 * @date 2022-05-30
 */
public interface IMallOrderService 
{
    /**
     * 查询订单
     * 
     * @param orderId 订单ID
     * @return 订单
     */
    public MallOrder selectMallOrderById(Long orderId);

    /**
     * 查询订单列表
     * 
     * @param mallOrder 订单
     * @return 订单集合
     */
    public List<MallOrder> selectMallOrderList(MallOrder mallOrder);

    /**
     * 新增订单
     * 
     * @param mallOrder 订单
     * @return 结果
     */
    public int insertMallOrder(MallOrder mallOrder);

    /**
     * 修改订单
     * 
     * @param mallOrder 订单
     * @return 结果
     */
    public int updateMallOrder(MallOrder mallOrder);

    /**
     * 批量删除订单
     * 
     * @param orderIds 需要删除的订单ID
     * @return 结果
     */
    public int deleteMallOrderByIds(Long[] orderIds);

    /**
     * 删除订单信息
     * 
     * @param orderId 订单ID
     * @return 结果
     */
    public int deleteMallOrderById(Long orderId);

    /**
     * 填写订单
     * @param customerId
     * @param openId
     * @param productId
     * @return
     */
    public List<MallCartVO> fillOrder(Long customerId, String openId, List<Long> productId);

    /**
     * 生成订单
     * @param mallOrder
     * @param customer
     * @return
     */
    public String createOrder(Customer customer, MallOrder mallOrder) throws Exception;

    /**
     * 商城银行卡支付
     * @param bankCardPay
     * @return
     */
    public String bankCardPay(MallBankCardPay bankCardPay) throws Exception;

    /**
     * 后台订单列表
     * @param search
     * @return
     */
    public List<MallOrderBackstage> mallOrderList(MallOrderSearch search);

    /**
     * 后台订单详情
     * @param orderId
     * @return
     */
    public MallOrderBackstageDetails orderBackstageDetails(Long orderId);

    /**
     * APP订单列表
     * @param customerId
     * @param status
     * @return
     */
    public List<WholeMallOrder> wholeMallOrder(Long customerId, String status);

    /**
     * APP订单详情
     * @param orderId
     * @return
     */
    public WholeMallOrderVO mallOrderDetails(Long orderId);

    /**
     * 商城退单
     * @param orderId
     * @return
     */
    public int mallOrderRefund(Long orderId);
}
